<template>
  <van-popup v-model="showPopup" position="bottom" @close="$emit('close')">
    <van-picker :title="`请选择${showTitle}`" show-toolbar :columns="columns" @confirm="$emit('confirm', $event, showTitle)" @cancel="$emit('close')" />
  </van-popup>
</template>

<script>
export default {
  name: 'PickerItem',
  props: {
    showPopup: { type: Boolean, default: false },
    columns: { type: Array, required: true },
    showTitle: { type: String, required: true }
  }
}
</script>

<style scoped lang="less">

</style>
